import time
# 经过实测，pypy3确实有20%以上的速度提升


def fib3(n):
    if not isinstance(n, int) or n < 1:
        return None
    lib_seq = [1, 1]
    if n <= 2:
        return lib_seq[: n - 1]
    for i in range(n - 2):
        lib_seq.append(lib_seq[-1] + lib_seq[-2])
    return lib_seq


t1 = time.time()
fib3(300000)
print(time.time()-t1)
